<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>json数据嵌套</title>
</head>
<body>
    <script type="text/javascript">
        /**
         * json对象的元素数组
         */
        var jsonObject = {
            "sex":["男","女"],
            "address":["上海","重庆"]
        };
        console.log(jsonObject.sex[1])
        for (var i = 0; i < jsonObject.address.length; i++) {
            console.log(jsonObject.address[i])
        }
    </script>
</body>
</html>